//
//  IDPViewController.h
//  Pong
//
//  Created by iD Student on 7/10/13.
//  Copyright (c) 2013 jasonkurtzman. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "IDPBall.h"
#import "IDPBallHard.h"

@interface IDPViewController : UIViewController
{
    BOOL isTwoPlayer;
    NSTimer *gameTimer;
    //NSTimer *survivivalTimer;
    
    //int p1Score;
    //int p2Score;
    int lastScorer;
    
    int counter;
    
    int timerCounter;
    
    int compDifficulty;
    
    int maxBallSpeed;
    int maxBallXSpeed;
    
    int maxMaxBallSpeed;
    int maxMaxBallXSpeed;
    
    int survivalTime;
    
    float velocity;
    
    IBOutlet UIImageView *paddle1;
    IBOutlet UIImageView *paddle2;
    
    IBOutlet UIButton *play2PlayerButton;
    IBOutlet UIButton *computerEasyButton;
    IBOutlet UIButton *computerMediumButton;
    IBOutlet UIButton *computerHardButton;
    
    IBOutlet UILabel *pointsLabel;
    IBOutlet UILabel *survivalLabel;
    
    IDPBall *ball;
    IDPBallHard *ballHard;
    
    //int maxBallSpeed;
    
    //For Goals
    int paddle1Score, paddle2Score;
    IBOutlet UIImageView *topGoal;
    IBOutlet UIImageView *bottomGoal;
    
    //For Walls
    IBOutlet UIImageView *leftWall;
    IBOutlet UIImageView *rightWall;
    
    //Background Music
    AVAudioPlayer *backgroundMusic;
}

-(IBAction)playTwoPlayerPressed:(id)sender;
-(IBAction)playVsComputerHardPressed:(id)sender;
-(IBAction)playVsComputerMediumPressed:(id)sender;
-(IBAction)playVsComputerEasyPressed:(id)sender;
-(void) updateGame;
-(void) moveBall;
-(void) checkForGoal;
-(void) resetBall;
-(void) AI;
-(void) timer;
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

@end
